package pe.com.pgn.consolidadorventas.servidorcentral.dbo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "CVEN_GLP_VENTAS")
@SequenceGenerator(name = "SEQ_CVEN_VENTAS", sequenceName = "SEQ_CVEN_VENTAS", allocationSize = 1)
public class GlpVenta implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "idVenta",unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_CVEN_VENTAS")
	private int idVenta;
	
	@Column(name = "Archivos_idArchivo")
	private int idArchivo;
	
	@Column(name = "docTypeId")
	private String docTypeId;

	@Column(name = "nbrDocument")
	private String nbrDocument;

	@Column(name = "siteId")
	private String siteId;
	
	@Column(name = "typePaymentId")
	private String typePaymentId;

	@Column(name = "stkInventory")
	private String stkInventory;
	
	@Column(name = "docStatusId")
	private String docStatusId;
	
	@Column(name = "termId")
	private String termId;
	
	@Column(name = "salesPerId")
	private String salesPerId;

	@Column(name = "userId")
	private String userId;
	
	@Column(name = "dateDoc")
	private Date dateDoc;
	
	@Column(name = "dateProceSales")
	private Date dateProceSales;

	@Column(name = "perPost")
	private String perPost;
	
	@Column(name = "totalPen")
	private BigDecimal totalPen;
	
	@Column(name = "subTotalPen")
	private BigDecimal subTotalPen;
	
	@Column(name = "taxIgvPen")
	private BigDecimal taxIgvPen;

	@Column(name = "totCashPen")
	private BigDecimal totCashPen;
	
	@Column(name = "custIdss")
	private String custIdss;
	
	@Column(name = "taxRegnBr")
	private String taxRegnBr;
	
	@Column(name = "placa")
	private String placa;
	
	@Column(name = "nbrBonus")
	private String nbrBonus;
	
	@Column(name = "salesPoint")
	private String salesPoint;
	
	@Column(name = "kilometraje")
	private BigDecimal kilometraje;
	
	@Column(name = "businessType")
	private String businessType;

	@Column(name = "user9")
	private String user9;
	
	@Column(name = "custName")
	private String custName;
	
	@Column(name = "filaVenDet")
	private String filaVenDet;
	
	@Column(name = "filaVenSal")
	private String filaVenSal;
	
	@Column(name = "filaVenDoc")
	private String filaVenDoc;
	
	@Column(name = "filaVenBon")
	private String filaVenBon;
	
	@Column(name = "chkVenDet")
	private BigDecimal chkVenDet;
	
	@Column(name = "chkVenSal")
	private BigDecimal chkVenSal;
	
	public int getIdVenta() {
		return idVenta;
	}
	public void setIdVenta(int idVenta) {
		this.idVenta = idVenta;
	}
	public int getIdArchivo() {
		return idArchivo;
	}
	public void setIdArchivo(int idArchivo) {
		this.idArchivo = idArchivo;
	}
	public String getDocTypeId() {
		return docTypeId;
	}
	public void setDocTypeId(String docTypeId) {
		this.docTypeId = docTypeId;
	}
	public String getNbrDocument() {
		return nbrDocument;
	}
	public void setNbrDocument(String nbrDocument) {
		this.nbrDocument = nbrDocument;
	}
	public String getSiteId() {
		return siteId;
	}
	public void setSiteId(String siteId) {
		this.siteId = siteId;
	}
	public String getTypePaymentId() {
		return typePaymentId;
	}
	public void setTypePaymentId(String typePaymentId) {
		this.typePaymentId = typePaymentId;
	}
	public String getStkInventory() {
		return stkInventory;
	}
	public void setStkInventory(String stkInventory) {
		this.stkInventory = stkInventory;
	}
	public String getDocStatusId() {
		return docStatusId;
	}
	public void setDocStatusId(String docStatusId) {
		this.docStatusId = docStatusId;
	}
	public String getTermId() {
		return termId;
	}
	public void setTermId(String termId) {
		this.termId = termId;
	}
	public String getSalesPerId() {
		return salesPerId;
	}
	public void setSalesPerId(String salesPerId) {
		this.salesPerId = salesPerId;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public Date getDateDoc() {
		return dateDoc;
	}
	public void setDateDoc(Date dateDoc) {
		this.dateDoc = dateDoc;
	}
	public Date getDateProceSales() {
		return dateProceSales;
	}
	public void setDateProceSales(Date dateProceSales) {
		this.dateProceSales = dateProceSales;
	}
	public String getPerPost() {
		return perPost;
	}
	public void setPerPost(String perPost) {
		this.perPost = perPost;
	}
	public BigDecimal getTotalPen() {
		return totalPen;
	}
	public void setTotalPen(BigDecimal totalPen) {
		this.totalPen = totalPen;
	}
	public BigDecimal getSubTotalPen() {
		return subTotalPen;
	}
	public void setSubTotalPen(BigDecimal subTotalPen) {
		this.subTotalPen = subTotalPen;
	}
	public BigDecimal getTaxIgvPen() {
		return taxIgvPen;
	}
	public void setTaxIgvPen(BigDecimal taxIgvPen) {
		this.taxIgvPen = taxIgvPen;
	}
	public BigDecimal getTotCashPen() {
		return totCashPen;
	}
	public void setTotCashPen(BigDecimal totCashPen) {
		this.totCashPen = totCashPen;
	}
	public String getCustIdss() {
		return custIdss;
	}
	public void setCustIdss(String custIdss) {
		this.custIdss = custIdss;
	}
	public String getTaxRegnBr() {
		return taxRegnBr;
	}
	public void setTaxRegnBr(String taxRegnBr) {
		this.taxRegnBr = taxRegnBr;
	}
	public String getPlaca() {
		return placa;
	}
	public void setPlaca(String placa) {
		this.placa = placa;
	}
	public String getNbrBonus() {
		return nbrBonus;
	}
	public void setNbrBonus(String nbrBonus) {
		this.nbrBonus = nbrBonus;
	}
	public String getSalesPoint() {
		return salesPoint;
	}
	public void setSalesPoint(String salesPoint) {
		this.salesPoint = salesPoint;
	}
	public BigDecimal getKilometraje() {
		return kilometraje;
	}
	public void setKilometraje(BigDecimal kilometraje) {
		this.kilometraje = kilometraje;
	}
	public String getBusinessType() {
		return businessType;
	}
	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}
	public String getUser9() {
		return user9;
	}
	public void setUser9(String user9) {
		this.user9 = user9;
	}
	public String getCustName() {
		return custName;
	}
	public void setCustName(String custName) {
		this.custName = custName;
	}
	public String getFilaVenDet() {
		return filaVenDet;
	}
	public void setFilaVenDet(String filaVenDet) {
		this.filaVenDet = filaVenDet;
	}
	public String getFilaVenSal() {
		return filaVenSal;
	}
	public void setFilaVenSal(String filaVenSal) {
		this.filaVenSal = filaVenSal;
	}
	public String getFilaVenDoc() {
		return filaVenDoc;
	}
	public void setFilaVenDoc(String filaVenDoc) {
		this.filaVenDoc = filaVenDoc;
	}
	public String getFilaVenBon() {
		return filaVenBon;
	}
	public void setFilaVenBon(String filaVenBon) {
		this.filaVenBon = filaVenBon;
	}
	public BigDecimal getChkVenDet() {
		return chkVenDet;
	}
	public void setChkVenDet(BigDecimal chkVenDet) {
		this.chkVenDet = chkVenDet;
	}
	public BigDecimal getChkVenSal() {
		return chkVenSal;
	}
	public void setChkVenSal(BigDecimal chkVenSal) {
		this.chkVenSal = chkVenSal;
	}
	@Override
	public String toString() {
		return "GlpVenta [idVenta=" + idVenta + ", idArchivo=" + idArchivo
				+ ", docTypeId=" + docTypeId + ", nbrDocument=" + nbrDocument
				+ ", siteId=" + siteId + ", typePaymentId=" + typePaymentId
				+ ", stkInventory=" + stkInventory + ", docStatusId="
				+ docStatusId + ", termId=" + termId + ", salesPerId="
				+ salesPerId + ", userId=" + userId + ", dateDoc=" + dateDoc
				+ ", dateProceSales=" + dateProceSales + ", perPost=" + perPost
				+ ", totalPen=" + totalPen + ", subTotalPen=" + subTotalPen
				+ ", taxIgvPen=" + taxIgvPen + ", totCashPen=" + totCashPen
				+ ", custIdss=" + custIdss + ", taxRegnBr=" + taxRegnBr
				+ ", placa=" + placa + ", nbrBonus=" + nbrBonus
				+ ", salesPoint=" + salesPoint + ", kilometraje=" + kilometraje
				+ ", businessType=" + businessType + ", user9=" + user9
				+ ", custName=" + custName + ", filaVenDet=" + filaVenDet
				+ ", filaVenSal=" + filaVenSal + ", filaVenDoc=" + filaVenDoc
				+ ", filaVenBon=" + filaVenBon + ", chkVenDet=" + chkVenDet
				+ ", chkVenSal=" + chkVenSal + "]";
	}
	
	public String getMontoVenta(){
		if(this.totalPen!=null){
			return this.totalPen.toString();
		}else{
			return "0.0";
		}
		
	}
	
}
